package com.mike.bdb.model;

import static com.sleepycat.persist.model.DeleteAction.*;
import com.sleepycat.persist.model.Entity;
import com.sleepycat.persist.model.PrimaryKey;
import static com.sleepycat.persist.model.Relationship.*;
import com.sleepycat.persist.model.SecondaryKey;

/**
 * 实体样例
 * @author <a href="zhaoming23@gmail.com">Mike</a>
 * @version 1.0
 * 2011-4-27 上午11:07:55
 */
@Entity (version = 1)
public class Monster {
	
	@PrimaryKey (sequence = "mosterId")
	private long id;
	
	@SecondaryKey(
			relate = MANY_TO_MANY,
			relatedEntity = Map.class,
			onRelatedEntityDelete = ABORT,
			name = "")
	private int mapId;
	
	private String name;
}
